<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/WEB-INF/templates/cadProfis.xhtml">
    <ui:param name="pPageTitle" value="Passo 2 de 5 | Endereços e telefones para contato" />
    <ui:define name="formulario">
        <p:toolbar>
            <p:toolbarGroup align="left">
                <p:commandButton action="#{profissionalView.voltar}" ajax="false"
                                 value="Voltar" icon="ui-icon-arrowthick-1-w" />
            </p:toolbarGroup>
            <p:toolbarGroup align="right">
                <p:commandButton action="#{profissionalView.actionSalvar}" ajax="false"
                                 value="Próximo" icon="ui-icon-arrowthick-1-e" />
            </p:toolbarGroup>
        </p:toolbar>
        <p:spacer width="10px"/>

        <p:panel header="Endereço Residencial">
            <h:panelGrid columns="4" cellpadding="3" columnClasses="textAlignRight,textAlignLeft,textAlignRight,textAlignLeft">  
                <p:outputLabel for="logEnd" value="${label['lograd']}" />
                <p:inputText id="logEnd" value="#{profissionalView.profissional.logradouro}" label="${label['lograd']}" 
                             required="true" size="50" maxlength="100" style="text-transform: capitalize"/>

                <p:outputLabel for="nEn" value="${label['numero']}"/>
                <p:inputMask id="nEn" value="#{profissionalView.profissional.numEnd}" label="${label['numero']}" mask="9?9999" 
                             required="true" size="10"/>

                <p:outputLabel for="bairro" value="${label['bairro']}" />
                <p:inputText id="bairro" value="#{profissionalView.profissional.bairroEnd}" label="${label['bairro']}" size="50"
                             required="true" maxlength="50" style="text-transform: capitalize"/>
               
                <p:outputLabel for="cepEn" value="${label['cep']}" />
                <p:inputMask id="cepEn" value="#{profissionalView.profissional.cepEnd}" label="${label['cep']}"
                             mask="99999-999" size="15"/>

                <p:outputLabel for="comp" value="${label['comp']}" />
                <p:inputText id="comp" value="#{profissionalView.profissional.comEnd}" label="${label['comp']}" size="50"
                             maxlength="100" style="text-transform: capitalize"/>
            </h:panelGrid>
        </p:panel>
        <p:spacer width="10px"/>
        <p:panel header="Endereço Consultório Particular">
            <h:panelGrid columns="4" cellpadding="3" columnClasses="textAlignRight,textAlignLeft,textAlignRight,textAlignLeft">
                <p:outputLabel for="endC" value="${label['lograd']}" />
                <p:inputText id="endC" value="#{profissionalView.profissional.endCon}" label="${label['lograd']}" 
                             size="50" maxlength="100" style="text-transform: capitalize"/>

                <p:outputLabel for="nCo" value="${label['numero']}"/>
                <p:inputMask id="nCo" value="#{profissionalView.profissional.numCon}" label="${label['numero']}" mask="9?9999" 
                             size="10"/>

                <p:outputLabel for="bairroC" value="${label['bairro']}" />
                <p:inputText id="bairroC" value="#{profissionalView.profissional.bairroCom}" label="${label['bairro']}" size="50"
                             maxlength="50" style="text-transform: capitalize"/>
                
                <p:outputLabel for="cepC" value="${label['cep']}" />
                <p:inputMask id="cepC" value="#{profissionalView.profissional.cepCon}" label="*${label['cep']}"
                             mask="99999-999" size="15"/>

                <p:outputLabel for="compC" value="${label['comp']}" />
                <p:inputText id="compC" value="#{profissionalView.profissional.endCon}" label="${label['comp']}" size="50"
                             maxlength="50" style="text-transform: capitalize"/>
            </h:panelGrid>
        </p:panel>
        <h:outputText value="Os campos com ( * ) são de preenchimento obrigatório" style="color: red"/>
    </ui:define>
</ui:composition>